export const useRoleList=()=>{
    function transformLabelsToTitles(menus){
        return menus.map(item=>{
            const newItem={
                title:item.label,
                key: item.key,
                icon: item.icon
            };
            if(item.children&&item.children.length>0){
                newItem.children = transformLabelsToTitles(item.children); // Recursively transform children
            }

            return newItem;
        })
    }

    return {
        transformLabelsToTitles
    }
}